var start=0,page=1,showNumber=20,isload = true;
var code,questionContainer;
$(function() {
	code = $('#code').val();
	questionContainer = $('#question_container');
	dataInit();
});

function dataInit(){
	$.ajax({
		url:"wap/order/refund/question",
		type:"post",
		async:true,
		dataType:"json",
		data:{start:start,showNumber:showNumber,"code":code},
		success : function(data) {
			var state = data.result.state;
			var petName;
			var html = '';
			if(state == 1){
				var qList = data.qList;
				$.each(qList,function(i,v){
					html = '';
					html += '<p class="pt20"></p>';
					petName = $('#petName').val();
					if(v.isUser == '00'){
						petName = "卍果平台客服";
					}
					html += '<div class="dotted pt20 pb10 ml20 mr20"><p class="f0 pt10"><span class="icon-kefu dib vm mr10"></span><span class="f28 dib vm">'+petName+'</span></p><dl class="pt10"><dt class="f26 pt10 g6">'+v.content+'</dt>';
					var pics = v.pic.split(',');
					if(pics.length > 0){
						html += '<dd class="update-list pt10 mt20 f0">';
						$.each(pics,function(pick,picv){
							if($.trim(picv) != ''){
							html+='<div class="update-item dib vm ui-1px"><img src="'+picv+'" alt=""></div>';
							}
						});
						html += '</dd>';
					}
					html+='<dd class="f24 g9 mt20 pt10 mb10">'+v.createTime+'</dd></dl></div>'
		            
					questionContainer.after(html);
				});
			}
			
		},
		error : function(XMLHttpRequest, textStatus, errorThrown){

		}
	});	
}





